// Plane
// (c) jimon game studio

#ifndef JEH_JEPLANE
#define JEH_JEPLANE

#include "jeTypes.h"
#include "jeVector3d.h"

namespace je
{
	//! Plane
	class jePlane
	{
	public:
		//Plane Vars
		f32 A,B,C,D;

		//! Constructor
		jePlane()
			:A(0),B(0),C(0),D(0)
		{
		}

		//! Constructor
		jePlane(f32 a,f32 b,f32 c,f32 d)
			:A(a),B(b),C(c),D(d)
		{
		}

		//! Destructor
		~jePlane()
		{
		}

		//! Get Distance from point to plane
		f32 GetDistance(const jeVector3df & Point)
		{
			return A * Point.X + B * Point.Y + C * Point.Z + D;
		}
	};
};

#endif
